package br.com.minhascontas.listview;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import br.com.example.minhascontas.R;

public class ListViewHeader extends BaseAdapter{

	private Context context;
	
	public ListViewHeader(Context context){
		this.context = context;

	}

	@Override
	public int getCount() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public Object getItem(int arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public long getItemId(int position) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		// TODO Auto-generated method stub
		
		LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
		View v = inflater.inflate(R.layout.teste2, null);
		
		TextView txtValor = (TextView) v.findViewById(R.id.txtValor);
		
		txtValor.setText("Testando header");	
		return v;
	}
	
	public View getView(double dblValor) {
		// TODO Auto-generated method stub
		
		LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
		View v = inflater.inflate(R.layout.teste2, null);
		
		TextView txtValor = (TextView) v.findViewById(R.id.txtValor);
		
		txtValor.setText(Double.toString(dblValor));	
		return v;
	}

}
